// 1、安装ejs
// 2、导入ejs
const ejs = require('ejs');
const fs = require('fs');

let china = "中国";
let result = ejs.render('我爱你，<%= china%>',{china}); 

let html = fs.readFileSync('t.html').toString();
let result2 = ejs.render(html,{china})
console.log(result2);